Skip to content

Initialize EventDispenser variation from a new -variation option#166

Open
zhaozhiwen wants to merge 1 commit into
gemc:mainfrom
zhaozhiwen:fix/124-variation-uninitialized
Open

Initialize EventDispenser variation from a new -variation option#166
zhaozhiwen wants to merge 1 commit into
gemc:mainfrom
zhaozhiwen:fix/124-variation-uninitialized

Conversation

@zhaozhiwen

Copy link
Copy Markdown
Collaborator

EventDispenser::variation was default-constructed ("") and never set, yet it is forwarded to loadConstants/loadTT for every run. Digitization routines that key calibration/translation data on the variation received an empty string instead of "default" (the geometry side already defaults to "default"), so run-dependent digitization was effectively un-versioned and disagreed with the geometry.

There was no top-level variation option to read (variation existed only as a per-system sub-field of gsystem), so add one defaulting to "default" (matching the geometry default) and read it in the constructor.

Validation: -variation=testvar123 is accepted and the run completes in the Geant4 11.4.1 dev container (previously there was no such option to set).

Fixes #124

EventDispenser::variation was default-constructed ("") and never set,
yet it is forwarded to loadConstants/loadTT for every run. Digitization
routines that key calibration/translation data on the variation received
an empty string instead of "default" (the geometry side already defaults
to "default"), so run-dependent digitization was effectively un-versioned
and disagreed with the geometry.

There was no top-level variation option to read ("variation" existed only
as a per-system sub-field of gsystem), so add one defaulting to "default"
(matching the geometry default) and read it in the constructor.

Verified: -variation=testvar123 is accepted and the run completes
(Geant4 11.4.1 dev container).

Fixes gemc#124

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Medium] EventDispenser::variation is never initialized, always passing empty string to digitization

1 participant